﻿IF EXISTS (SELECT * FROM sysobjects WHERE type = 'P' AND name = 'PRC_TB_USER_ABSENCES_SE')
	BEGIN
		DROP  Procedure  dbo.PRC_TB_USER_ABSENCES_SE
	END

GO

CREATE PROCEDURE [dbo].[PRC_TB_USER_ABSENCES_SE] 
(
    @TUAUSERID Integer 
)
AS
	SELECT a.TUA_USER_ID, a.TUA_START_DATE, a.TUA_END_DATE, a.TUA_WEEKEND
	    FROM TB_USER_ABSENCES a
        where a.TUA_USER_ID = @TUAUSERID
        ORDER BY a.TUA_START_DATE


GO

GRANT EXEC ON dbo.PRC_TB_USER_ABSENCES_SE TO PUBLIC

GO

